import { Button } from "antd";
import React from "react";
import "./index.less";

/**
 * @author Bronson
 * @description YButton 基于antd的自定义按钮组件
 * @date 2021.07.22
 */

const YButton = ({
  value = "确定",
  type = "default",
  shape = "round",
  disabled,
  onClick,
}) => {
  return (
    <Button
      disabled={disabled}
      className={[
        "u-button",
        type ? type : "",
        disabled ? "disabled" : "",
      ].join(" ")}
      shape={shape}
      onClick={() => onClick()}
    >
      {value}
    </Button>
  );
};

export default YButton;
